import { getHotAPI } from '@/apis/home'
import { reactive,onMounted } from 'vue'
import { defineStore } from 'pinia'

export const useHotStore = defineStore('hot',() => {
    const hotList = reactive([])

    const getHotList = async () => {
        const { result } = await getHotAPI()
        Object.assign(hotList,result)
    }

    onMounted(() => {
        getHotList()
    })
    
    return { hotList }
})